package cn.szzsi._web;

import cn.szzsi.service.MemberActionLogService;
import cn.szzsi.core.kit.HttpRequestUtils;
import com.jfinal.core.Controller;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * 会员行为轨迹记录
 * Created by admin on 2017/8/1.
 */
public class BrandMemberController extends Controller {
    public static final ExecutorService fixedThreadPool = Executors.newFixedThreadPool(100);

    public void index(){
        final String memberId=getPara("mid");//会员id
        String ip= null;
        try {
            ip = HttpRequestUtils.getIpAddr(getRequest());
        } catch (Exception e) {
            e.printStackTrace();
        }
        final String finalIp = ip;
        final String pageId=getPara("pi");
        final String url=getPara("url");
        final String rurl=getPara("rurl");
        fixedThreadPool.execute(new Runnable() {
            public void run() {
                MemberActionLogService.service.saveLog(memberId,"","","","","",url,rurl);
            }
        });

        renderNull();
    }
}
